package com.ccbhelper.provider;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.ant.liao.GifView;
import com.ant.liao.GifView.GifImageType;
import com.ccbhelper.activity.R;

public class MyLoadingDialog extends Dialog {
    private GifView gf;
    private TextView tv;
    public MyLoadingDialog(Context context,String message) {
        super(context,R.style.loading_dialog);
        // TODO Auto-generated constructor stub
        final View view = getLayoutInflater().inflate(R.layout.loading,  
                null);  
        gf = (GifView)view.findViewById(R.id.gv_loading);
        tv = (TextView)view.findViewById(R.id.tv_loading);
        tv.setText(message);
			/*	try {
					Thread.sleep(5000);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}*/
        gf.setGifImageType(GifImageType.COVER);
        gf.setGifImage(R.drawable.loading);
        setContentView(view);
    }
}
